import React from "react";
import {useDispatch,useSelector} from "react-redux"
import {dogetext,dogetextselece} from 'store/text'
const index = () =>{
const dispatch = useDispatch<any>()
const textlist = useSelector(dogetextselece)
console.log("text数据",textlist);

const getlist = () =>{
    dispatch(dogetext())
}
getlist()
    return ( 
        <div>
            <p>{textlist.length<=0 && textlist.length.map((v: any,i: any)=><p key='i'>
                    {textlist[0].departmentName}
            </p>)   
            
            
            }</p>
        </div>
    )
}

export default index

function componentDidMount() {
    throw new Error("Function not implemented.");
}
